<script>
export default {
  // 1.创建
  beforeCreate(){
    console.log('beforeCreate')
  },
  created(){
    console.log('created')
  },
  // 2.挂载
  beforeMount(){
    console.log('beforeMount')
  },
  mounted(){
    console.log('mounted')
  },
  // 3.更新
  beforeUpdate(){
    console.log('beforeUpdate')
  },
  updated(){
    console.log('updated')
  },
  // 4.销毁
  beforeUnmount(){
    console.log('beforeUnmount')
  },
  unmounted(){
    console.log('unmounted')
  }
}
</script>

<template>
<h1>生命周期函数</h1>
</template>

<style scoped>
/* 样式 */

</style>
